package com.zijin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zijin.entity.TheSecondFloorAccount;
import com.zijin.mapper.TheSecondFloorAccountMapper;
import com.zijin.service.TheSecondFloorAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 第二层账户信息Service实现
 * */
@Service
public class TheSecondFloorAccountServiceImpl extends ServiceImpl<TheSecondFloorAccountMapper, TheSecondFloorAccount> implements TheSecondFloorAccountService {

    @Autowired
    private TheSecondFloorAccountMapper theSecondFloorAccountMapper;
    /**
     * 根据卡号查找账户信息
     * */
    @Override
    public List<TheSecondFloorAccount> findAccountByBankNo(String tradeBankNo) {
        LambdaQueryWrapper<TheSecondFloorAccount> queryWrapper = Wrappers.<TheSecondFloorAccount>lambdaQuery();
        queryWrapper.eq(TheSecondFloorAccount::getTradeBankNo, tradeBankNo);
        List<TheSecondFloorAccount> theSecondFloorAccounts = theSecondFloorAccountMapper.selectList(queryWrapper);
        return theSecondFloorAccounts;
    }
}
